package com.Service.impl;

import com.Service.GroupJoinService;
import com.mapper.GroupJoinMapper;
import com.pojo.GroupJoin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GroupJoinServiceImpl implements GroupJoinService {
    @Autowired
    private GroupJoinMapper groupJoinMapper;



    @Override
    public List<GroupJoin> findOpenGroupsByActivityId(Long id) {
        return groupJoinMapper.findOpenGroupsByActivityId(id);
    }

    @Override
    public void join(Long userId, Long activityId) {
        groupJoinMapper.i(userId, activityId);
    }
}
